#if !defined(__SURFACE_GRAPHIQUE_H)
#define __SURFACE_GRAPHIQUE_H

#include "commun/sous_systeme.h"

class video;
class module_interface;

class surface_graphique : dependant_de<video> {
	friend class afficheur_surfaces;
	int x_, y_;
public:
	surface_graphique(int nx = 0, int ny = 0) throw() : x_(nx), y_(ny) {}
	virtual ~surface_graphique() throw() {}
	
	void x(int nx) { x_ = nx; }
	void y(int ny) { y_ = ny; }
	int x() const { return x_; }
	int y() const { return y_; }
	virtual int width() const = 0;
	virtual int height() const = 0;
	
	bool contient(int tx, int ty) const {
		return tx >= x() && tx <= x() + width()
			&& ty >= y() && ty <= y() + height();
	}
};

#endif
